package com.sky.sky_server.service;

import com.sky.sky_pojo.dto.HistoryOrderVO;
import com.sky.sky_pojo.dto.OrderSearchVO;
import com.sky.sky_pojo.dto.OrderStatisticsVO;
import com.sky.sky_pojo.dto.OrderSubmitDTO;
import com.sky.sky_pojo.dto.OrderSubmitVO;
import com.sky.sky_pojo.dto.OrderVO;
import com.sky.sky_pojo.entity.OrderQueryPage;
import com.sky.sky_pojo.entity.PageResult;

public interface OrderService {
    /**
     * 提交订单
     */
    OrderSubmitVO submitOrder(OrderSubmitDTO orderSubmitDTO);
    
    /**
     * 根据id查询订单详情
     */
    OrderVO getOrderDetail(Long id);

    /**
     *  查询历史订单
     */
    PageResult<HistoryOrderVO> historyOrders(OrderQueryPage orderQueryPage);

    /**
     * 取消订单
     * @param id
     */
    void cancelOrder(Long id);

    /**
     * 客户催单
     */
    void reminderOrder(Long id);

    /**
     * 再来一单
     */
    int repetitionOrder(Long id);

    // 管理端订单操作

    /**
     * 商家接单
     */
    int confirmOrder(Long id);

    /**
     * 商家取消订单
     */
    int cancelOrderForAdmin(Long id, String cancelReason);

    /**
     * 商家搜索订单
     */
    PageResult<OrderSearchVO> searchOrderForAdmin(OrderQueryPage orderQueryPage);

    /**
     * 各个状态的订单数量
     */
    OrderStatisticsVO statisticsOrder();

    /**
     * 拒绝订单
     */
    int rejectOrderForAdmin(Long id, String cancelReason);

    /**
     * 派送订单
     */
    int deliveryOrderForAdmin(Long id);

    /**
     * 订单完成
     */
    int completeOrderForAdmin(Long id);
}
